Page({
  data: {
    isSearchOn: false,
    searchTxt: null,
    id: 0,
    families0:['内科','外科','妇产科','儿科','眼科','口腔科','肿瘤科','中医科','耳鼻咽喉科','皮肤科','神经科','传染病科','康复科','营养科'],
    families1: null
  },
  searchOn(){
    this.setData({isSearchOn: true});
  },
  searchOff(){
    this.setData({isSearchOn: false});
  },
  selectFamily(event){
    let index = event.currentTarget.dataset.index;
    this.setData({id: index});
  },
  onShow(){
    let families = getApp().globalData.families;
    this.setData({families1: families});
  },
  toSelectDoctor(event){
    let res = event.currentTarget.dataset.index;
    getApp().globalData.selectedFamily = [this.data.id,res];
    wx.navigateTo({
      url: '../selectDoctor/selectDoctor',
    });
  }
})